/*
 *
 * (c) Copyright Ascensio System Limited 2010-2018
 *
 * This program is freeware. You can redistribute it and/or modify it under the terms of the GNU 
 * General Public License (GPL) version 3 as published by the Free Software Foundation (https://www.gnu.org/copyleft/gpl.html). 
 * In accordance with Section 7(a) of the GNU GPL its Section 15 shall be amended to the effect that 
 * Ascensio System SIA expressly excludes the warranty of non-infringement of any third-party rights.
 *
 * THIS PROGRAM IS DISTRIBUTED WITHOUT ANY WARRANTY; WITHOUT EVEN THE IMPLIED WARRANTY OF MERCHANTABILITY OR
 * FITNESS FOR A PARTICULAR PURPOSE. For more details, see GNU GPL at https://www.gnu.org/copyleft/gpl.html
 *
 * You can contact Ascensio System SIA by email at sales@onlyoffice.com
 *
 * The interactive user interfaces in modified source and object code versions of ONLYOFFICE must display 
 * Appropriate Legal Notices, as required under Section 5 of the GNU GPL version 3.
 *
 * Pursuant to Section 7 § 3(b) of the GNU GPL you must retain the original ONLYOFFICE logo which contains 
 * relevant author attributions when distributing the software. If the display of the logo in its graphic 
 * form is not reasonably feasible for technical reasons, you must include the words "Powered by ONLYOFFICE" 
 * in every copy of the program you distribute. 
 * Pursuant to Section 7 § 3(e) we decline to grant you any rights under trademark law for use of our trademarks.
 *
*/


@import 'settings.less';
@import 'mixins.less';

.contacts_list {
    @border-style: @messages-border-style;
    width: 100%;
    table-layout: fixed;

    .row {
        height: @address-book-row-height;
        border-bottom: @border-style;
        /* zero cell padding */
        > * {
            padding: 0;
        }

        .checkbox {
            cursor: pointer;
            width: @row-height;

            input {
                margin-left: 9px;
                float: none;
            }
        }

        .avatar_container {
            width: @address-book-row-height;
            padding: 4px;

            .contact_avatar_fake, .contact_avatar {
                border: 1px solid #c7c7c7;
                height: 32px;
                width: 32px;
                background-color: #fff;
            }

            .contact_avatar_fake {
                display: block;
            }
        }

        .info {
            width: 25%;
            word-wrap: break-word;
            vertical-align: middle;

            .name {
                .box-sizing(border-box);
                padding-right: @row-height * 0.25;
                width: 100%;
                display: inline-block;
                white-space: nowrap;
                overflow: hidden;
                text-overflow: ellipsis;
                font-weight: bold;
            }
            .title, .crm_company {
                .box-sizing(border-box);
                padding-right: @row-height * 0.25;
                display: inline-block;
                white-space: nowrap;
                overflow: hidden;
                text-overflow: ellipsis;
                padding-right: 8.25px;
                width: 100%;
            }
        }

        .emails_list {
            .emails {
                white-space: nowrap;
                overflow: hidden;

                .email {
                    display: block;
                    float: left;
                    overflow: hidden !important;
                    width: auto !important;
                    margin: 0px !important;
                    text-overflow: ellipsis;
                    max-width: 50%;
                    height: 18px;

                    .contactEmail {
                        color: #333333;
                        font-size: 12px;
                        text-decoration: none;
                        cursor: pointer;
                        text-overflow: ellipsis;
                        overflow: hidden;
                    }
                }

                &.oneEmail {
                    .email {
                        max-width: 95%;
                    }
                }
            }
        }

        .phones_list {
            .phones {
                white-space: nowrap;
                overflow: hidden;

                .phone {
                    display: block;
                    float: left;
                    overflow: hidden !important;
                    width: auto !important;
                    margin: 0px !important;
                    text-overflow: ellipsis;
                    max-width: 50%;
                    height: 18px;

                    .contactPhone {
                        color: #333333;
                        font-size: 12px;
                        text-decoration: none;
                        text-overflow: ellipsis;
                        overflow: hidden;
                    }
                }

                &.onePhone {
                    .phone {
                        max-width: 95%;
                    }
                }
            }
        }

        .tags_info {
            .labels {
                .tag {
                    margin: 0 5px 0 0;
                    display: block;
                    float: left;
                    cursor: default;
                }
            }
        }

        .menu_column {
            width: @row-height;
            padding-right: 9px;

            .entity-menu {
                float: right;
                margin: 0;
            }
        }

        &:hover {
            background-color: @hovered-row_bg;

            .notification {
                display: inline-block;
            }

            .contactEmail {
                text-decoration: underline !important;
            }

            .more_lnk {
                .gray {
                    border-bottom: 1px dotted #333;
                }
            }
        }

        &.selected {
            background-color: @selected-row_bg;
        }
    }
}
.menuActionSendEmail
{
    span
    {
        max-width: none;
    }
}

.popupContainerClass {
    table {
        width: 100%;

        .contactNmeBlock {
            margin-bottom: @base-distance * 2;

            .contactName {
                width: 314px;
            }
        }

        .contactAddlBlock {
            margin-bottom: @base-distance * 2;
        }

        .contactEmail, .contactPhone {
            width: 314px;
        }

        .contactEmails, .contactPhones {
            margin: @base-distance 0 0 0;
            width: 100%;
            max-height: 64px;
            overflow-y: auto;

            .value {
                line-height: 20px;
                display: inline-block;
                float: left;
                overflow: hidden;
                text-overflow: ellipsis;
                color: #333333;
                max-width: 256px;
            }

            .delete_entity {
                background: url("../images/base_sprite.png") -20px 0 no-repeat;
                width: 16px;
                height: 16px;
                display: inline-block;
                cursor: pointer;
                float: left;
                margin: 2px 0 0 8px;

                &:hover {
                    background-position-y: -20px;
                }
            }
        }

        #contact-add-phones {
            .headerPanelSmall {
                &:after {
                    content: "";
                }
            }
        }

        .contactDescription {
            width: 314px;
            height: 52px;
            resize: none;
        }
    }
}